import {MyRequest} from "@/utils/request.js"

//所有单词搜索
export function vagueSearch(obj){
	return MyRequest({
		method:'GET',
		url:`/api/word/vagueSearch?keyWord=${obj.keyWord}&count=${obj.count}`,
	})
}
//词库列表
export function cikulist(){
	return MyRequest({
		method:'GET',
		url:`/api/type/list`,
	})
}

//单词列表
export function listByTypeId(typeId){
	return MyRequest({
		method:'GET',
		url:`/api/word/listByTypeId?typeId=${typeId}`,
	})
}

//根据分组id查询分组下所有单词
export function groupWord(groupId){
	return MyRequest({
		method:'GET',
		url:`/api/groupWord/list?groupId=${groupId}`,
	})
}

//批量导入
export function addgroupWord(groupId,data){
	return MyRequest({
		method:'POST',
		url:`/api/groupWord/add?groupId=${groupId}`,
		data
	})
}